from typing import List


class Solution:
    def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int:
        s = []
        intervals.sort(key=lambda x: (x[1] - x[0], x[0]))

        for x, y in intervals:
            pass


if __name__ == "__main__":
    s = Solution().eraseOverlapIntervals([[1, 2], [2, 3], [3, 4], [1, 3]])
    print(s)
